<style>

    .add_sms_quota form {
        width: 500px;
    }

    .add_sms_quota .first-td {
        width: 120px;
        padding: 16px 0 0 10px;
    }

    .add_sms_quota .last-td {
        padding: 12px 40px 0 10px;
        width: 400px;
    }

    .add_sms_quota .w100p {
        width: 100%;
    }

</style>

<div i="content" class="add_sms_quota ui-dialog-content mt5">
    <form class="ui-dialog-content" name="addSmsQuotaForm">
        <table width="100%">
            <tbody>
            <tr>
                <td class="first-td" align="right" valign="top">短信剩余：</td>
                <td class="last-td" style="padding-top: 16px;" valign="top">
                    {{(data.Quota - data.UsedNum) || 0}}条，累计购买{{data.Quota || 0}}条，发送{{data.UsedNum || 0}}条
                </td>
            </tr>
            <tr>
                <td class="first-td" align="right" valign="top"><span class="c-red">* </span>短信数量：</td>
                <td class="last-td" valign="top">
                    <input class="w100p" type="text" name="addQuota" required placeholder="支持负值，即扣减"
                           ng-model="data.addQuota"
                           yk-more-than="data.UsedNum - data.Quota"
                           ng-pattern="/^-?\d+(\.\d+)?$/">
                    <div ng-messages="addSmsQuotaForm.addQuota.$error"
                         ng-show="addSmsQuotaForm.$submitted || addSmsQuotaForm.addQuota.$touched">
                        <p class="c-red lh30" ng-message="required">本次赠送不能为空</p>
                        <p class="c-red lh30" ng-message="morethan">此租户只剩余{{data.Quota - data.UsedNum}}条短信，不足扣除</p>
                        <p class="c-red lh30" ng-message="pattern">只能输入数字, 支持负值</p>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="first-td" align="right" valign="top">短信金额：</td>
                <td class="last-td" valign="top">
                    <input class="w100p" type="text" name="amount" placeholder="0"
                           ng-model="data.amount"
                           ng-pattern="/^\d+(\.\d+)?$/">
                    <div ng-messages="addSmsQuotaForm.amount.$error"
                         ng-show="addSmsQuotaForm.$submitted || addSmsQuotaForm.amount.$touched">
                        <p class="c-red lh30" ng-message="pattern">只能输入数字</p>
                    </div>
                </td>
            </tr>
            </tbody>
        </table>
    </form>
</div>